import {get, post_json } from '@/http/axios'
export default {
    namespaced: true,
    state: {
        // 产品数据
        productData: [],



    },
    mutations: {
        SET_PRODUCTDATA(state, payload) {
            state.productData = payload;
            // state.productDataTotal = total;
            // console.log(payload);
        }
    },
    actions: {
        // 获取产品数据
        async getAllProductData({ commit }, payload) {
            let res = await get('/product/pageQuery', payload)
                // console.log(res);
            commit('SET_PRODUCTDATA', { list: res.data.data.list, total: res.data.data.total })
                // commit('SET_PRODUCTDATA', )
                // console.log();
        }
    }
}